# - Find PropertyEditor
# Find the native PropertyEditor includes and library
#
#  PROPERTYEDITOR_INCLUDE_DIR - where to find propertyeditor.h, etc.
#  PROPERTYEDITOR_LIBRARIES   - List of libraries when using PropertyEditor.
#  PROPERTYEDITOR_FOUND       - True if PropertyEditor found.


IF (PROPERTYEDITOR_INCLUDE_DIR)
  # Already in cache, be silent
  SET(PROPERTYEDITOR_FIND_QUIETLY TRUE)
ENDIF (PROPERTYEDITOR_INCLUDE_DIR)

FIND_PATH(PROPERTYEDITOR_INCLUDE_DIR propertyeditor.h)

FIND_LIBRARY(PROPERTYEDITOR_LIBRARY NAMES PropertyEditor)

# handle the QUIETLY and REQUIRED arguments and set PROPERTYEDITOR_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PropertyEditor DEFAULT_MSG PROPERTYEDITOR_LIBRARY PROPERTYEDITOR_INCLUDE_DIR)

IF(PROPERTYEDITOR_FOUND)
  SET( PROPERTYEDITOR_LIBRARIES ${PROPERTYEDITOR_LIBRARY} )
ELSE(PROPERTYEDITOR_FOUND)
  SET( PROPERTYEDITOR_LIBRARIES )
ENDIF(PROPERTYEDITOR_FOUND)

MARK_AS_ADVANCED( PROPERTYEDITOR_LIBRARY PROPERTYEDITOR_INCLUDE_DIR )
